home *** CD-ROM | disk | FTP | other *** search
-
-
-
- HHHHAAAASSSSHHHH((((3333)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((AAAAuuuugggguuuusssstttt 11118888,,,, 1111999999994444)))) HHHHAAAASSSSHHHH((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- hash - hash database access method
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
- ####iiiinnnncccclllluuuuddddeeee <<<<ddddbbbb....hhhh>>>>
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The routine _d_b_o_p_e_n is the library interface to database
- files. One of the supported file formats is hash files.
- The general description of the database access methods is in
- _d_b_o_p_e_n(3), this manual page describes only the hash specific
- information.
-
- The hash data structure is an extensible, dynamic hashing
- scheme.
-
- The access method specific data structure provided to _d_b_o_p_e_n
- is defined in the <db.h> include file as follows:
-
- typedef struct {
- u_int bsize;
- u_int ffactor;
- u_int nelem;
- u_int cachesize;
- u_int32_t (*hash)(const void *, size_t);
- int lorder;
- } HASHINFO;
-
- The elements of this structure are as follows:
-
- bsize
- _B_s_i_z_e defines the hash table bucket size, and is, by
- default, 256 bytes. It may be preferable to increase
- the page size for disk-resident tables and tables with
- large data items.
-
- ffactor
- _F_f_a_c_t_o_r indicates a desired density within the hash
- table. It is an approximation of the number of keys
- allowed to accumulate in any one bucket, determining
- when the hash table grows or shrinks. The default
- value is 8.
-
- nelem
- _N_e_l_e_m is an estimate of the final size of the hash
- table. If not set or set too low, hash tables will
- expand gracefully as keys are entered, although a
- slight performance degradation may be noticed. The
- default value is 1.
-
- cachesize
-
-
-
- Page 1 (printed 4/30/98)
-
-
-
-
-
-
- HHHHAAAASSSSHHHH((((3333)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((AAAAuuuugggguuuusssstttt 11118888,,,, 1111999999994444)))) HHHHAAAASSSSHHHH((((3333))))
-
-
-
- A suggested maximum size, in bytes, of the memory
- cache. This value is oooonnnnllllyyyy advisory, and the access
- method will allocate more memory rather than fail.
-
- hash _H_a_s_h is a user defined hash function. Since no hash
- function performs equally well on all possible data,
- the user may find that the built-in hash function does
- poorly on a particular data set. User specified hash
- functions must take two arguments (a pointer to a byte
- string and a length) and return a 32-bit quantity to be
- used as the hash value.
-
- lorder
- The byte order for integers in the stored database
- metadata. The number should represent the order as an
- integer; for example, big endian order would be the
- number 4,321. If _l_o_r_d_e_r is 0 (no order is specified)
- the current host order is used. If the file already
- exists, the specified value is ignored and the value
- specified when the tree was created is used.
-
- If the file already exists (and the O_TRUNC flag is not
- specified), the values specified for the parameters bsize,
- ffactor, lorder and nelem are ignored and the values
- specified when the tree was created are used.
-
- If a hash function is specified, _h_a_s_h__o_p_e_n will attempt to
- determine if the hash function specified is the same as the
- one with which the database was created, and will fail if it
- is not.
-
- Backward compatible interfaces to the routines described in
- _d_b_m(3), and _n_d_b_m(3) are provided, however these interfaces
- are not compatible with previous file formats.
-
- EEEERRRRRRRROOOORRRRSSSS
- The _h_a_s_h access method routines may fail and set _e_r_r_n_o for
- any of the errors specified for the library routine
- _d_b_o_p_e_n(3).
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- _b_t_r_e_e(3), _d_b_o_p_e_n(3), _m_p_o_o_l(3), _r_e_c_n_o(3)
-
- _D_y_n_a_m_i_c _H_a_s_h _T_a_b_l_e_s, Per-Ake Larson, Communications of the
- ACM, April 1988.
-
- _A _N_e_w _H_a_s_h _P_a_c_k_a_g_e _f_o_r _U_N_I_X, Margo Seltzer, USENIX
- Proceedings, Winter 1991.
-
- BBBBUUUUGGGGSSSS
- Only big and little endian byte order is supported.
-
-
-
-
- Page 2 (printed 4/30/98)
-
-
-
-
-
-
- HHHHAAAASSSSHHHH((((3333)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((AAAAuuuugggguuuusssstttt 11118888,,,, 1111999999994444)))) HHHHAAAASSSSHHHH((((3333))))
-
-
-
- This version of berkeley db (1.85) is free software which is
- not developed nor maintained by SGI. It is known to have
- some bugs that are unlikely to get fixed (See NOTES below)
- in particular, the following hash operations are known to
- have problems, up to corrupting databases, and should be
- avoided according to http://www.sleepycat.com/db.185.html:
-
- o Overwriting or deleting overflow hash key/data pairs
- (pairs with items larger than the page size).
-
- o Intermixing hash cursor operations with deletes.
-
-
- NNNNOOOOTTTTEEEESSSS
- The default hash function in this version of db is the
- Fowler/Vo/Noll hash which gives better distributions (less
- collisions) on average than the publicly released version.
-
- This version of berkeley db is 1.85. A newer enhanced
- version db-2.x requires licensing. The db 2.x version is
- more stable, faster, and supports concurrent accesses plus
- many other new features. Check out
- http://www.sleepycat.com/ for details.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 4/30/98)
-
-
-
-